package org.springframework.cloud.openfeign;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import feign.Feign;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration(proxyBeanMethods=false)
@AutoConfigureBefore(FeignAutoConfiguration.class)
public class HystrixFeignClientConfiguration  {


    @Bean
    public Targeter feignMTargeter() {
        return new HystrixMTargeter();
    }

    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilderM(){
        return HystrixFeignM.builder();
    }




}
